﻿using System;

namespace Chimp.Core
{
    public class ChimpDebug
    {
        public static void AssertNull(object val, string locale)
        {
            if (val == null)
            {
                LogError("Non-Null-Assertion Faliure. Aborting Execution.", locale);
            }
        }

        public static void LogError(string error, string from)
        {
            //TChimp CTP error "management" lol :)
            throw new Exception("Xeno threw an error\nLocale:" + from + "\nReason:" + error +
                                "\nThis is Preview Tech, please report this bug to the developers.");
        }
    }
}